package com.dal.common.utils;

import org.springframework.util.StringUtils;

import java.util.Calendar;
import java.util.Date;

/**
 * @Author：jian
 * @Package：com.dal.common.utils
 * @Project：spring-boot
 * @name：Test
 * @Date：2024/12/13 14:40
 * @Filename：Test
 */
public class Test {
    public static void main(String[] args) {
        String a = "1";
        String [] merchantIds = a.split(",");
        for (int i = 0; i<merchantIds.length;i++){
            String merchantId = merchantIds[i];
            if (StringUtils.isEmpty(merchantId)){
                continue;
            }

            if (i != merchantIds.length-1) {
                System.err.println("q");
            }
            System.err.println(merchantId);
        }

        String label = "applebananacherry"; // 示例输入
        String[] currLabel = label.split("\\$");
        for (String s : currLabel) {
            System.err.println(s);
        }

        Date date = new Date();
        int hours = date.getHours();
        System.err.println(hours);

        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 9);  // 设置小时为上午9点
        calendar.set(Calendar.MINUTE, 0);       // 设置分钟为0
        calendar.set(Calendar.SECOND, 0);       // 设置秒为0
        calendar.set(Calendar.MILLISECOND, 0);  // 设置毫秒为0

        Date nineAM = calendar.getTime();
        int hours1 = nineAM.getHours();
        System.err.println(hours1);

    }
}
